import request from '@/utils/request'
import loginRequest from '@/utils/isLoginRequest'
// 考试模块--1--开始考试
export function startExamApi(data) {
	return loginRequest({
		url: `/info/api/web/userexam/startexam`,
		method: 'GET',
		params: data
	})
}
// 考试模块--2--获取试卷题型结构
export function getExamInfoApi(data) {
	return loginRequest({
		url: `/info/api/web/userexam/getuserexaminfo`,
		method: 'GET',
		params: data
	})
}
// 考试模块--3--获取题目详情 包括是否选择了答案
export function getQuerstionApi(data) {
	return loginRequest({
		url: `/info/api/web/userexam/getquestioninfo`,
		method: 'GET',
		params: data
	})
}
//考试模块--4--录入答案
export function uploadanswerApi(data) {
	return loginRequest({
		url: `/info/api/web/userexam/uploadanswer`,
		method: 'GET',
		params: data
	})
}
//考试模块--5--结束考试
export function endExamApi(data) {
	return loginRequest({
		url: `/info/api/web/userexam/endexam`,
		method: 'GET',
		params: data
	})
}
// 获取模拟测试列表

export function getSimulationListApi(data) {
	return loginRequest({
		url: `/info/api/web/usersimulation/getSimulationList`,
		method: 'GET',
		params: data
	})
}
export function getSimulationDirApi(data) {
	return loginRequest({
		url: `/info/api/web/usersimulation/category`,
		method: 'GET',
		params: data
	})
}
// 模拟考点练习组卷
export function getFreeExamApi(data) {
	return loginRequest({
		url: `/info/api/web/usersimulation/geFreeCombinationCcRepoList`,
		method: 'GET',
		params: data
	})
}
// 模拟自由组卷生成试卷
export function getFreePaperApi(data) {
	return loginRequest({
		url: `/info/api/web/usersimulation/addFreeCombination2Simulation`,
		method: 'POST',
		data: data
	})
}
// 根据id生成试卷
export function getPaperByIdApi(data) {
	return loginRequest({
		url: `/info/api/web/usersimulation/getuserSimulationPaper`,
		method: 'GET',
		params: data
	})
}
// 获取题目详情
export function getQuestionApi(data) {
	return loginRequest({
		url: `/info/api/web/usersimulation/getquestioninfo`,
		method: 'GET',
		params: data
	})
}

// 	答题
export function uploadAnswerApi(data) {
	return loginRequest({
		url: `/info/api/web/usersimulation/uploadanswer`,
		method: 'GET',
		params: data
	})
}
// 模拟试卷提交
export function upLoadPaperApi(data) {
	return loginRequest({
		url: `/info/api/web/usersimulation/endSimulation`,
		method: 'GET',
		params: data
	})
}
// 获取竞赛列表
export function getCompetitionListApi(data) {
	return loginRequest({
		url: `/info/api/cc/CcCompetitionInfo/list`,
		method: 'GET',
		params: data
	})
}

// 报名竞赛
export function playCompetitionApi(data) {
	return loginRequest({
		url: `/info/api/web/competition/signup`,
		method: 'GET',
		params: data
	})
}
// 获取考点练习
export function getPointsExamApi(data) {
	return loginRequest({
		url: `/info/api/web/usersimulation/getExamPointsQuestionsList`,
		method: 'GET',
		params: data
	})
}

// 生成考点练习试卷
export function creatPointsExamApi(data) {
	return loginRequest({
		url: `/info/api/web/usersimulation/addExamPoints2Simulation`,
		method: 'GET',
		params: data
	})
}